﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.fmtx.Model;

namespace com.fmtx.IDal
{
    public interface ICity:IBase<City>
    {
        /// <summary>
        /// 名称是否存在
        /// </summary>
        /// <param name="name"></param>
        /// <returns>存在true，</returns>
        bool IsExists(string name);

        /// <summary>
        /// 通过名称查询城市列表
        /// </summary>
        /// <param name="name">匹配的字符英文亦可</param>
        /// <param name="num">返回个数</param>
        /// <returns></returns>
        List<City> QueryByName(string name,int num);

        /// <summary>
        /// 分页获取城市信息
        /// </summary>
        /// <param name="index"></param>
        /// <param name="size"></param>
        /// <param name="name"></param>
        /// <param name="countryId"></param>
        /// <returns></returns>
        IList<City> Query(int index,int size,string name,int countryId,out int count);

        /// <summary>
        /// 查询所有城市只查id及name
        /// </summary>
        /// <returns></returns>
        IList<City> QueryIdAndName();
        /// <summary>
        /// 国家下的城市
        /// </summary>
        /// <param name="cid"></param>
        /// <returns></returns>
        IList<City> QueryByCountry(int cid,int index,int size,ref int count);

    }
}
